<%
     if(params.project_id == null) 
          response.sendRedirect("../");
%>

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

  <title>CollabDev</title>
  
  <style type="text/css">
	@import "css/default.css";
  </style>
  
  <script language="Javascript" type="text/javascript" src=
     "js/jquery-1.2.6.js">
  </script>
  
  <script language="Javascript" type="text/javascript" src=
     "js/jquery.timers-1.0.0.js">
  </script>
  
  <script language="Javascript" type="text/javascript" src=
     "ui_libs/edit_area/edit_area_loader.js">
  </script>

  <script language="Javascript" type="text/javascript">
     var document_id = <%=params.document_id%> ;
     //<![CDATA[   
          // runing after editor created
          function init() {
          
               input_frame = $("#frame_code").contents();
               
               input_frame.find('#editor').keypress( function() { 
                    keypress(); 
               });

               register_client( document_id );
               
               selectDocument( document_id );
                                             
               //always check codes to server
               $(document).everyTime("200ms", function(){
                    check_status();
               } , 0);
          }

     //]]>
  </script>
         
  <script language="Javascript" type="text/javascript" src=
     "js/gui_setup.js">
  </script>
  
</head>

<body>
     <div id="header">
          Real Time Collaborative Editor
     </div>
     
     <div id="status_container">
          <div id="message" class="round_menu" style="display:none">
               Connection error, retrying...
          </div>
     </div>

     <div id="code_area">
          <input id="document_id" type="hidden"/>
          <input id="documentName" type="hidden"/>
          <textarea id="code" name="code" style="height: 100%; width: 100%;"></textarea>
     </div>
     
      <div id="footer">
          <small>Copyright(c) 2008 Indrio Eko Purnomo<small>
      </div>

</body>
</html>

